import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

/// A text field that also has buttons to select all the text and copy the
/// selected text to the clipboard.
class ColorFilteredPage extends StatefulWidget {
  const ColorFilteredPage({super.key});

  @override
  State<ColorFilteredPage> createState() => _ColorFilteredPageState();
}

class _ColorFilteredPageState extends State<ColorFilteredPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            //左侧的照片
            Expanded(
              child: Image.asset("assets/images/banner3.png"),
            ),
            const SizedBox(width: 33),
            //右侧的照片
            Expanded(
              child: ColorFiltered(
                colorFilter: const ColorFilter.mode(
                  Colors.grey,
                  BlendMode.saturation,
                ),
                child: Image.asset("assets/images/banner3.png"),
              ),
            )
          ],
        ),
      ),
    );
  }
}

void main() => runApp(
      MaterialApp(
        locale: const Locale('zh'),
        localizationsDelegates: [
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          GlobalCupertinoLocalizations.delegate,
        ],
        supportedLocales: const [
          //此处
          Locale('zh', 'CH'),
          Locale('en', 'US'),
        ],
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: ColorFilteredPage(),
      ),
    );
